package com.qzxy.premiumhotelsystem.common.result;

/**
 * 统一返回结果状态信息类
 *
 */
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    ERROR(-1,"失败"),
    INVALID_REQUEST(400, "无效请求"),
    BAD_REQUEST(405,"语法错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "未找到"),
    USERNAME_ERROR(406, "用户名错误"),
    PASSWORD_ERROR(407, "密码错误"),
    USERNAME_ALREADY_EXISTS(409, "用户名已存在"),
    SERVER_ERROR(500, "服务器内部错误"),
    CAPTCHA_INVALID(422, "验证码无效");



    private Integer code;
    private String message;
    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
